export default{
    state:{
        userInfo:{
            avatar:'/image/common/avator.png',
            nickname:'小鹿线-默认',
            gender:1,
            city:'北京市朝阳区',
            id:1
        },
        isLogin: JSON.parse(localStorage.getItem('isLogin')) || false
    },
    getters:{},
    mutations:{
        saveUserInfo(state,payload){
            state.userInfo = payload
        },
        saveLogin(state,payload){
            state.isLogin = payload
        }
    },
    actions:{
        saveUserInfoAction({commit},payload){
            commit('saveUserInfo',payload)
        },
        saveLoginAction({commit},payload){
            commit('saveLogin',payload)
        }
    }
}